package com.alibaba.cloud.cargo.infrastructure.event;

import com.alibaba.cloud.cargo.infrastructure.shared.DomainEventPublisher;
import com.google.common.eventbus.EventBus;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;

@Component
@RequiredArgsConstructor
public class GuavaDomainEventPublisher implements DomainEventPublisher {

    private final EventBus eventBus;

    @Override
    public void publish(Object event) {
        eventBus.post(event);
    }

}
